#ifndef UTILS_H
#define UTILS_H 1

#include "main.h"
#include "string.h"

#define path_str char[MAXPATHLEN+1];
#define str_eq(s1,s2)  (!strcmp ((s1),(s2)))

bool
isdir(const char * path);

bool
rpath(char *path, char realpath[MAXPATHLEN+1]);

string_t *
check_rpath(const char *doc_dir, const char *uri);

long
indexOf(const char *str, const char *substr);

char *
gen_random_str(char **dst, const size_t len);

#endif
